﻿/// <reference path="../jquery-1.6.2-vsdoc.js" />

//Init
$(function () {
    $('#dnd-blog-archive .archiveYear li label').click(hideArchiveYearContent).hover(OnYearArchiveMouseIn, OnYearArchiveMouseOut);
    $('.archiveMonth').hide();
});

//Hide corresponding year month panel
function hideArchiveYearContent(evt) {
    var monthArchive = $(this).parent().find('ul');
    if (monthArchive.is(':visible'))
        monthArchive.slideUp();
    else
        monthArchive.slideDown();
}

function OnYearArchiveMouseIn() {
    $(this).stop(true, true).animate({
        backgroundColor: '#9BD715'
    }, 200);
}

function OnYearArchiveMouseOut() {
    $(this).stop(true, true).animate({
        backgroundColor: '#E6FECA'
    }, 200);
}